/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entities;

import java.io.Serializable;

/**
 *
 * @author Andrés Felipe
 */
public class ProductStructure implements Serializable {
    private static final long serialVersionUID = 1L;
    protected ProductStructurePK productStructurePK;
    private Double quantityrequired;
    private Product product;
    private Product product1;

    public ProductStructure() {
    }

    public ProductStructure(ProductStructurePK productStructurePK) {
        this.productStructurePK = productStructurePK;
    }

    public ProductStructure(int productid, int productidc) {
        this.productStructurePK = new ProductStructurePK(productid, productidc);
    }

    public ProductStructurePK getProductStructurePK() {
        return productStructurePK;
    }

    public void setProductStructurePK(ProductStructurePK productStructurePK) {
        this.productStructurePK = productStructurePK;
    }

    public Double getQuantityrequired() {
        return quantityrequired;
    }

    public void setQuantityrequired(Double quantityrequired) {
        this.quantityrequired = quantityrequired;
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public Product getProduct1() {
        return product1;
    }

    public void setProduct1(Product product1) {
        this.product1 = product1;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (productStructurePK != null ? productStructurePK.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ProductStructure)) {
            return false;
        }
        ProductStructure other = (ProductStructure) object;
        if ((this.productStructurePK == null && other.productStructurePK != null) || (this.productStructurePK != null && !this.productStructurePK.equals(other.productStructurePK))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.ProductStructure[ productStructurePK=" + productStructurePK + " ]";
    }
    
}
